main(n,m)
{
	for(;scanf("%d%d",&n,&m);)
		if(n|m)
			if(n%m)
				printf("%d\n",n%m);
			else
				puts("multiple");
		else
			break;
}
